<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<style>
    div > span {
        color: green;
    }
</style>
<body>

    <!-- 
        子选择器div > span只会选择div下面的span标签
        区别与后代选择器会选择所有的后代标签
    -->
    <span>span标签</span>
    <div>
        <span>div标签下面儿子的标签</span>
        <p>
            <span>div标签下面孙子的标签</span>
        </p>
    </div>
</body>

</html>